<?php

//服务器和数据库信息
$servername = "localhost";
$username = "root";
$password = "";
$dbName = "myDB";
$tableName  = "myguest";
 
// 创建连接
$conn = new mysqli($servername, $username, $password, $dbName);
 
// 检测连接
if ($conn->connect_error) {
  die("连接失败: " . $conn->connect_error);
}

$sql = "DELETE FROM  $tableName  where id = 10";  

if($conn->query($sql) === true){
  echo("yes");
}else{
  echo("no");
}

$conn->close();